3.160 \(\int \frac{(a+b \log (c x^n)) (d+e \log (f x^r))}{x^2} \, dx\)

Optimal. Leaf size=72 \[ -\frac{\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )}{x}-\frac{e r \left (a+b \log \left (c x^n\right )+b n\right )}{x}-\frac{b n \left (d+e \log \left (f x^r\right )\right )}{x}-\frac{b e n r}{x} \]

[Out]

-((b*e*n*r)/x) - (e*r*(a + b*n + b*Log[c*x^n]))/x - (b*n*(d + e*Log[f*x^r]))/x - ((a + b*Log[c*x^n])*(d + e*Lo
g[f*x^r]))/x

________________________________________________________________________________________

Rubi [A]  time = 0.0707982, antiderivative size = 72, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.083, Rules used = {2304, 2366} \[ -\frac{\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )}{x}-\frac{e r \left (a+b \log \left (c x^n\right )+b n\right )}{x}-\frac{b n \left (d+e \log \left (f x^r\right )\right )}{x}-\frac{b e n r}{x} \]

Antiderivative was successfully verified.

[In]

Int[((a + b*Log[c*x^n])*(d + e*Log[f*x^r]))/x^2,x]

[Out]

-((b*e*n*r)/x) - (e*r*(a + b*n + b*Log[c*x^n]))/x - (b*n*(d + e*Log[f*x^r]))/x - ((a + b*Log[c*x^n])*(d + e*Lo
g[f*x^r]))/x

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2366

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.) + Log[(f_.)*(x_)^(r_.)]*(e_.))*((g_.)*(x_))^(m_.), x_Sy
mbol] :> With[{u = IntHide[(g*x)^m*(a + b*Log[c*x^n])^p, x]}, Dist[d + e*Log[f*x^r], u, x] - Dist[e*r, Int[Sim
plifyIntegrand[u/x, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, r}, x] &&  !(EqQ[p, 1] && EqQ[a, 0] &&
 NeQ[d, 0])

Rubi steps

\begin{align*} \int \frac{\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )}{x^2} \, dx &=-\frac{b n \left (d+e \log \left (f x^r\right )\right )}{x}-\frac{\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )}{x}-(e r) \int \frac{-a \left (1+\frac{b n}{a}\right )-b \log \left (c x^n\right )}{x^2} \, dx\\ &=-\frac{b e n r}{x}-\frac{e r \left (a+b n+b \log \left (c x^n\right )\right )}{x}-\frac{b n \left (d+e \log \left (f x^r\right )\right )}{x}-\frac{\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )}{x}\\ \end{align*}

Mathematica [A]  time = 0.0642405, size = 57, normalized size = 0.79 \[ -\frac{e (a+b n) \log \left (f x^r\right )+a d+a e r+b \log \left (c x^n\right ) \left (d+e \log \left (f x^r\right )+e r\right )+b d n+2 b e n r}{x} \]

Antiderivative was successfully verified.

[In]

Integrate[((a + b*Log[c*x^n])*(d + e*Log[f*x^r]))/x^2,x]

[Out]

-((a*d + b*d*n + a*e*r + 2*b*e*n*r + e*(a + b*n)*Log[f*x^r] + b*Log[c*x^n]*(d + e*r + e*Log[f*x^r]))/x)

________________________________________________________________________________________

Maple [C]  time = 0.187, size = 1443, normalized size = 20. \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))*(d+e*ln(f*x^r))/x^2,x)

[Out]

-1/2*e*(-I*b*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+I*b*Pi*csgn(I*c)*csgn(I*c*x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*x^n)^2*csgn(I*f*x^r)^3+Pi
^2*b*e*csgn(I*c*x^n)^3*csgn(I*f)*csgn(I*f*x^r)^2+Pi^2*b*e*csgn(I*c*x^n)^3*csgn(I*x^r)*csgn(I*f*x^r)^2-2*I*ln(c
)*Pi*b*e*csgn(I*f*x^r)^3-2*I*Pi*ln(f)*b*e*csgn(I*c*x^n)^3+2*I*Pi*a*e*csgn(I*f)*csgn(I*f*x^r)^2+2*I*Pi*a*e*csgn
(I*x^r)*csgn(I*f*x^r)^2+2*I*Pi*b*d*csgn(I*c)*csgn(I*c*x^n)^2)/x

________________________________________________________________________________________

Maxima [A]  time = 1.16872, size = 127, normalized size = 1.76 \begin{align*} -b e{\left (\frac{r}{x} + \frac{\log \left (f x^{r}\right )}{x}\right )} \log \left (c x^{n}\right ) - \frac{b e n{\left (2 \, r + \log \left (f\right ) + \log \left (x^{r}\right )\right )}}{x} - \frac{b d n}{x} - \frac{a e r}{x} - \frac{b d \log \left (c x^{n}\right )}{x} - \frac{a e \log \left (f x^{r}\right )}{x} - \frac{a d}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*(d+e*log(f*x^r))/x^2,x, algorithm="maxima")

[Out]

-b*e*(r/x + log(f*x^r)/x)*log(c*x^n) - b*e*n*(2*r + log(f) + log(x^r))/x - b*d*n/x - a*e*r/x - b*d*log(c*x^n)/
x - a*e*log(f*x^r)/x - a*d/x

________________________________________________________________________________________

Fricas [A]  time = 0.904932, size = 247, normalized size = 3.43 \begin{align*} -\frac{b e n r \log \left (x\right )^{2} + b d n + a d +{\left (2 \, b e n + a e\right )} r +{\left (b e r + b d\right )} \log \left (c\right ) +{\left (b e n + b e \log \left (c\right ) + a e\right )} \log \left (f\right ) +{\left (b e r \log \left (c\right ) + b e n \log \left (f\right ) + b d n +{\left (2 \, b e n + a e\right )} r\right )} \log \left (x\right )}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*(d+e*log(f*x^r))/x^2,x, algorithm="fricas")

[Out]

-(b*e*n*r*log(x)^2 + b*d*n + a*d + (2*b*e*n + a*e)*r + (b*e*r + b*d)*log(c) + (b*e*n + b*e*log(c) + a*e)*log(f
) + (b*e*r*log(c) + b*e*n*log(f) + b*d*n + (2*b*e*n + a*e)*r)*log(x))/x

________________________________________________________________________________________

Sympy [B]  time = 3.16067, size = 153, normalized size = 2.12 \begin{align*} - \frac{a d}{x} - \frac{a e r \log{\left (x \right )}}{x} - \frac{a e r}{x} - \frac{a e \log{\left (f \right )}}{x} - \frac{b d n \log{\left (x \right )}}{x} - \frac{b d n}{x} - \frac{b d \log{\left (c \right )}}{x} - \frac{b e n r \log{\left (x \right )}^{2}}{x} - \frac{2 b e n r \log{\left (x \right )}}{x} - \frac{2 b e n r}{x} - \frac{b e n \log{\left (f \right )} \log{\left (x \right )}}{x} - \frac{b e n \log{\left (f \right )}}{x} - \frac{b e r \log{\left (c \right )} \log{\left (x \right )}}{x} - \frac{b e r \log{\left (c \right )}}{x} - \frac{b e \log{\left (c \right )} \log{\left (f \right )}}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))*(d+e*ln(f*x**r))/x**2,x)

[Out]

-a*d/x - a*e*r*log(x)/x - a*e*r/x - a*e*log(f)/x - b*d*n*log(x)/x - b*d*n/x - b*d*log(c)/x - b*e*n*r*log(x)**2
/x - 2*b*e*n*r*log(x)/x - 2*b*e*n*r/x - b*e*n*log(f)*log(x)/x - b*e*n*log(f)/x - b*e*r*log(c)*log(x)/x - b*e*r
*log(c)/x - b*e*log(c)*log(f)/x

________________________________________________________________________________________

Giac [A]  time = 1.25003, size = 146, normalized size = 2.03 \begin{align*} -\frac{b n r e \log \left (x\right )^{2} + 2 \, b n r e \log \left (x\right ) + b r e \log \left (c\right ) \log \left (x\right ) + b n e \log \left (f\right ) \log \left (x\right ) + 2 \, b n r e + b r e \log \left (c\right ) + b n e \log \left (f\right ) + b e \log \left (c\right ) \log \left (f\right ) + b d n \log \left (x\right ) + a r e \log \left (x\right ) + b d n + a r e + b d \log \left (c\right ) + a e \log \left (f\right ) + a d}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*(d+e*log(f*x^r))/x^2,x, algorithm="giac")

[Out]

-(b*n*r*e*log(x)^2 + 2*b*n*r*e*log(x) + b*r*e*log(c)*log(x) + b*n*e*log(f)*log(x) + 2*b*n*r*e + b*r*e*log(c) +
 b*n*e*log(f) + b*e*log(c)*log(f) + b*d*n*log(x) + a*r*e*log(x) + b*d*n + a*r*e + b*d*log(c) + a*e*log(f) + a*
d)/x